1: Overview
CLaser ranging sensors are mainly used for fixed or moving speeds less than1rice/SMeasure the object.
Its main features are:
lCan maintain high accuracy and reliability even in harsh environments.
lLarge working voltage range(7-30V)It can be powered by car power supply, industrial switch power supply, ordinary DC power supply, etc.
lLow power consumption, in standby mode0.2W.. 0.3WWhen working continuously1.0W.. 1.5W.
lThe measuring laser is a visible laser, aiming at the object being measured.
lRich output interfaces, capable of simultaneous outputRS232,RS485,Analog quantity (supported)4..20mA,0..20mA, 0..24mA, 0..5V, 0..10VFive methods are available, with two switch signals (relay output),Other interfaces can be customized.
lAnalog and switch quantities can be programmed through commands, making them flexible to use.
lFlexible operation, can be achieved throughPCMachine, microcontroller,PLCWaiting for the command to be sent can also be operated through an external trigger line.
lRemote control can be achieved by adding wireless modules.
2: Safety Notice
This series of laser ranging sensors has a maximum laser emission power of1mW,The security level is2Level of security.Compliant with IEC825-1/DIN EN60825-1:2001-11 and FDA 21 CFR regulations. If an accident occurs and the human eye is exposed to laser light for a short period of time (greater than 0.25 seconds), the human eye can be protected by the blink reflex of its own eyelids. The blink reflex of a person can effectively protect their eyes.
Although the product may not require specialized safety protection devices, it is still necessary to avoid direct viewing of the laser beam as much as possible. Do not aim the laser beam directly at the human body. Sensors can be used without any protective measures.
Application precautions:
lWhen sunlight or other strong light directly enters the sensor lens, errors may occur.
lMeasuring objects with poor reflective surfaces in strongly reflective environments may result in errors.
lWhen the reflection surface of the object being measured is too strong, measurement errors may occur.
lMeasurement through transparent objects such as glass, filters, resins, etc. may result in incorrect data.
lWhen rapidly changing the measurement environment or measuring distance, the sensor may return no data or generate incorrect data for a short period of time.
lThe measurement rate indicated by the sensor is the static measurement rate, and it will slow down when measuring the speed of dynamic objects. The GH series sensor supports a maximum speed of 1m/s, and it is recommended to use it when the speed is less than 0.5m/s.
This series of laser ranging sensors uses the principle of phase comparison for measurement. Laser sensors emit visible laser beams of different frequencies, receive scattered laser light returned from the measured object, compare the received laser signal with a reference signal, and finally, use a microprocessor to calculate the distance between objects corresponding to the corresponding phase shift, which can achieve millimeter level measurement accuracy
This series of lasers is in standby mode after power on, and can be started by the following methods
Send measurement commands via RS232 or RS485.
Short circuit the trigger line (Trip) to the negative terminal of the power supply and start the measurement.
4: Technical parameters
application |
Distance measurement, used for natural solid surfaces without reflectors |
||
measuring range |
GHLM04C |
0.2m... 40m |
|
GHLM07C |
0.2m... 70m |
||
GHLM10C |
0.2m... 100m |
||
measurement accuracy |
The typical accuracy is1mm+20ppmWhen the reflection effect of the reflective surface is poor, the error will correspondingly increase |
||
resolution |
0.1mm |
||
Measurement Frequency |
Not less than10Hz(This frequency is the measurement frequency under static conditions) |
||
repeatability |
±0.5mm |
||
Measurement starting point |
It can be freely set. The factory default setting is the front end. |
||
Working mode |
CONTINUE |
After startup, the sensor automatically returns the measurement results. The return time interval can be freely set. |
|
SINGLE |
After startup and completion of measurement, it automatically returns to standby mode. |
||
Fixed frequency measurement |
After startup, the sensor automatically returns the measurement results. After the set number of returned results is reached, it will automatically return to standby mode |
||
Pre measurement |
After starting and measuring, the results are stored in memory and no data is returned. Quickly return after the next single measurement command is sent. |
||
Trigger measurement |
Start through an external trigger line and automatically return measurement results continuously after startup. The return time interval can be freely set. |
||
security level |
2Grade, compliant DIN EN 60825-1:2001-11(EC825-1)Standard,≤ 1mW (red) |
||
operation temperature |
-10℃.. 50℃The temperature range can be expanded through heating and cooling devices |
||
storage temperature |
-20℃.. 70℃ |
||
output interface |
Digital Interface |
supportRS485,RS232Two communication methods,standard configuration |
|
ANALOG |
Can support0-20mA,0-24mA,4-20mA,0-5V,0-10VThe default corresponding distance for analog output is0-10Rice.Optional |
||
Switch interface |
Two individually programmable relay output interfaces.Optional |
||
Supply Voltage |
7V-30VStandby power consumption<0.3W, working power consumption<1.5W |
||
External dimensions |
For details, please refer to Part 5: Mechanical Structure |
||
Mounting Hole | |||
weight |
make an appointment800g |
||
protection grade |
IP65,ALUMINUM SHELL |
||
Options |
water(gas)Refrigeration kit, analog output module, switch output module, digital display module, heating module, wireless communication, etc |
||
Customizable content |
Communication protocol, external dimensions, output mode, dual head laser,XYBidirectional measurement, increased internal storage, extended cable (standard configuration)1Rice and other special functions. |
5: Mechanical structure(1Class as default shell, if needed2Please confirm with the salesperson when placing the order, otherwise1Based on the class,1The class shell can be converted into and2Same installation size for class shells)
1Class shell size:
2Class shell size:
This series of lasers is in standby mode after power on, and can be started by the following methods
l pass throughRS232perhapsRS485Send measurement commands.
l Trigger the line(Trip)Short circuit with the negative terminal of the power supply, initiate measurement.
6: Cable definition (wiring instructions)
Attention: The end of the cable is exposed, so be sure to prevent short circuits when using it!
6Core cable, used for standard version sensors. Its definition is as follows:
colour |
function |
colour |
function |
1:red |
Power supply positive |
2:black |
Negative power supply |
3:yellow |
external trigger |
4:orange/blue |
RS485-A/RS232-TX |
5:green |
RS485-B/RS232-RX |
6:white |
signal ground |
8Core cable. The interface definition for outputting analog or switch signals is as follows:
colour |
simulate-RS485 |
simulate-RS232 |
switch-RS232 |
switchRS485 |
red |
Power supply positive |
|||
black |
Negative power supply |
|||
yellow |
external trigger |
|||
white/blue |
signal ground |
Switching output1 |
||
green |
RS485-B |
RS232-RX |
RS485-B |
|
orange |
RS485-A |
RS232-TX |
RS485-A |
|
blue |
Analog output positive |
Switching output2 |
||
brown |
empty |
Switch output common terminal |
10The chip version is used for the complete output sensor, and its interface definition is as follows:
colour |
Full functionality-RS485 |
Full functionalityRS232 |
red |
Power supply positive |
|
black |
Negative power supply |
|
yellow |
external trigger |
|
white |
signal ground |
|
green |
RS485-B |
RS232-R |
orange |
RS485-A |
RS232-T |
blue |
Switching output2 |
|
brown |
Switch output common terminal |
|
Purple; |
Analog output positive |
|
grey |
Switching output1 |
7: Communication Protocol
This series of sensors supports two communication protocols simultaneously. They are self owned agreements andMODBUSagreement. Below are detailed explanations of the two protocols:
7.1Own agreement
7.1.1Protocol features
l All commands on this machine have no obvious end bit, which is greater than5MSThe time interval serves as the basis for the end of this group of commands.
l All command checksum on this machine is the complement of the sum of all preceding bytes(CS).
l The device address range is01H.. F9H(1-249),FA(250)For the broadcast address.
l The measurement command does not respond to the broadcast address.
7.1.2command format
hostRead class command:CMD-RRead the command code for class commands,See table for detailsCMD-R | |||||
describe |
address |
function code |
Command code |
check |
|
length |
1Byte |
1Byte |
1Byte |
1BYte |
|
Example |
ADDR |
06H |
CMD-R |
CS |
|
Read class command device returns: | |||||
describe |
address |
function code |
Command code |
Data Content |
check |
length |
1Byte |
1Byte |
1Byte |
Nbyte |
1BYte |
Example |
ADDR |
06H |
CMD-R | 80H |
DAT1...DATN |
CS |
hostSet Class Command:CMD-WSet command codes for class commands, see table for detailsCMD-W | |||||||
describe |
address |
function code |
Command code |
Data Content |
check |
||
length |
1Byte |
1Byte |
1Byte |
nBytes |
1BYte |
||
Example |
ADDR |
04H |
CMD-W |
Dat1....dat2 |
CS |
||
Set command device return: Successful | |||||||
describe |
address |
function code |
|
check |
|||
length |
1Byte |
1Byte |
|
1BYte |
|||
Example |
ADDR |
04H |
|
CS |
|||
Set command device return: failed | |||||||
describe |
address |
function code |
error code |
check |
|||
length |
1Byte |
1Byte |
1Byte |
1BYte |
|||
Example |
ADDR |
84H |
ErrCode |
CS |
CMD-RAnd data content description
CMD -R |
describe |
Sensor returns data content |
||
01H |
Read basic parameters |
ADDR,MEAL(4Bytes),MEAH(4Bytes),AoutConfig(2Bytes),MeaInterval(4Bytes),MeaOffer(2Bytes). |
||
02H |
Start single measurement |
3XH, 3XH, 3XH, 2EH, 3XH, 3XH, 3XH(ASCII,) Single measurement response broadcast address(pour1)Continuous measurement does not respond to broadcast addresses |
||
03H |
Start continuous measurement |
|||
04H |
Read measurement value cache |
Directly read the measurement value cache without performing any other operations on the sensor. |
||
05H |
Start continuous measurement without returning data |
This command starts continuous measurement but does not return data, and is used in conjunction with the 04H command |
||
06H |
Read Time |
YY,MM,DD,HH,mm,SSFormat as BCD code (customized function) |
||
07H |
Read memory data volume |
NumH,NumLUp to 1280 items (customized function) |
||
08H |
NumH,NumL send content |
read data |
Read the Numth data from memory and return formats NumH, NumL, YY, MM, DD, HH, mm, SS, DATH, DATL (custom function) |
|
09H |
Read the current temperature |
Customized items.Temprature(1Byte), unit:℃ |
||
0AH |
reserve |
|
||
0BH |
reserve |
|
||
0CH |
Read switch related parameters |
SwitchConfig(2Bytes), Sw1L(4Bytes), Sw1H(4Bytes), Sw2L(4Bytes),, Sw2H(4Bytes) |
||
0DH |
Read other settings |
OtherConfig(2Bytes) |
||
0EH |
Read model, serial number, etc |
Dat1 Dat2 ….. Dat20(ASCII) |
||
0FH |
Read device name, special information |
Dat1 Dat2 ….. Dat28(ASCII) |
||
10H |
reserve |
|
|
pour1Initiate a single measurement using the broadcast address, and the sensor initiates the measurement but does not return data. When starting a single measurement with the device address next time, the sensor will no longer initiate the measurement but quickly return the previous measurement data. This command is mainly used to improve measurement efficiency when there are multiple machines on a single bus.
CMD_WAnd data content description
CMD -W |
describe |
The content of the written data |
01H |
Set Address |
NewAddr (New sensor address) |
02H |
Stop measuring |
No parameters |
03H |
reserve |
reserve |
04H |
Simulate output status |
AouConfig(2Bytes) |
05H |
Continuous working data time interval(ms) |
MeaInterval(4Bytes) |
06H |
Set simulation range |
MEAL(4Bytes),MEAH(4Bytes) |
07H |
Distance correction value |
MeaOffer(2Bytes) |
08H |
reserve |
reserve |
09H |
Switch output status |
SwitchConfig(2Bytes) |
0AH |
Set trigger point |
SwNum, SwnL(4Bytes), SwnH(4Bytes)(SwNumValues 1-2 represent the trigger point number to be set, followed by specific numerical values |
0BH |
reserve |
|
0CH |
Other settings |
OtherConfig(2Bytes) |
0DH |
Fixed frequency measurement |
MeaNum(2Bytes)This command starts continuous measurement and automatically shuts down after returning MeaNum data consecutively |
0EH |
set time |
YY,MM,DD,HH,mm,SSFormat as BCD code (customized function) |
0FH |
Clear memory data |
Customized functions |
.. |
reserve |
|
7FH |
factory reset |
No parameters |
Parameter description:
parameter |
describe |
initial value |
Detailed explanation |
Addr |
Device Address |
80H |
1Bytes,The range of values is01H... F9H.FAHFor broadcasting addresses |
MEAL |
Simulate the lower limit of the range |
0000H |
4Bytes, UnitmmThis variable is only related to the analog output |
MEAH |
Simulation range upper limit |
maximum range50% |
4Bytes, UnitmmThis variable is only related to the analog output |
AouConfig |
Simulated output status setting |
4305H |
2BytePlease refer to the attached table for details. |
MeaInterval |
Data return time interval |
0064H |
2Byte,The time interval between data returns during continuous work. Unit milliseconds. |
MeaOffer |
Measurement correction value |
0000H |
2Bytes,Measure the correction value. The highest bit is the symbol bit0straight1Negative. unitmm. Value range-32000mm...+ 32000mm |
SwitchConfig |
Switch output status setting |
0004H |
2Bytes,Please refer to the attached table for details. |
SwnL |
switch point |
0000H |
4Bytes,auxiliary word for ordinal numbersnCorresponding value of the lower limit of the road switch point, unitmm |
SwnH |
switch point |
0000H |
4Bytes,auxiliary word for ordinal numbersnCorresponding value of upper limit of road switch point, unitmm |
MeaNum |
Continuous work measurement frequency |
0000H |
2Bytes,After the sensor starts continuous measurement, it continuously performsMeaNumAfter the second measurement, stop continuous measurement. do0Measure continuously.This value is invalid for externally triggered startup work |
OtherConfig |
Other settings |
0001H |
for details see attached table |
Example of proprietary protocol command(Sensor default address80H):
Initiate a single measurement:
describe |
address |
function code |
Command code |
|
check |
length |
1Byte |
1Byte |
1Byte |
|
1BYte |
Example |
80H |
06H |
02H |
|
78H |
Equipment return
describe |
address |
function code |
Command code |
content |
check |
length |
1Byte |
1Byte |
1Byte |
7Bytes |
1BYte |
Example |
80H |
06H |
82H |
30H,31H,32H,2EH,34H,35H,36H |
98H |
meaning |
The current measured distance is012.456rice |
Set sensor address:Set the sensor address to01H
describe |
address |
function code |
Command code |
Data Content |
check |
length |
1Byte |
1Byte |
1Byte |
1Byte |
1BYte |
Example |
80H |
04H |
01H |
01H |
78H |
Setting successful:
describe |
address |
function code |
|
|
check |
length |
1Byte |
1Byte |
|
|
1BYte |
Example |
80H |
04H |
|
|
7CH |
Setting failed:
describe |
address |
function code |
error code |
|
check |
length |
1Byte |
1Byte |
1Byte |
|
1BYte |
Example |
80H |
84H |
01H |
|
FBH |
7.2 MODBUSagreement
7.2.1Protocol features
l All registers are16Position.
l The range of device address codes is1-249.250(FAH)For the broadcast address.
l Standard protocol, convenient to usePLCDevelop secondary applications using configuration software, etc.
l The maximum number of parameters read each time is32Byte, i.e16A register
7.2.2command format
Host Read Class Command | ||||||||||||||
describe |
address |
function code |
start address |
Number of Registers |
CRC16 |
|||||||||
length |
1Byte |
1Byte |
2Byte |
2Byte |
2BYte |
|||||||||
Example |
01H |
03H |
0001H |
0003H |
95CBH |
|||||||||
This example is at the address of01HThe device0001HAddress start, read0003HRegister contents | ||||||||||||||
Read class command device returns: Normal | ||||||||||||||
describe |
address |
function code |
Return the number of bytes |
Data Content |
CRC16 |
|||||||||
length |
1Byte |
1Byte |
1Byte |
N Byte |
2BYte |
|||||||||
Example |
01H |
03H |
06H |
DAT1,..DAT6 |
CRCH,CRCL |
|||||||||
Total content returned by the device3A register6One byte | ||||||||||||||
Read class command device returns: Exception | ||||||||||||||
describe |
address |
function code |
Return the number of bytes |
error code |
CRC16 |
|||||||||
length |
1Byte |
1Byte |
1Byte |
1 Byte |
2BYte |
|||||||||
Example |
01H |
03H |
81H |
ErrCode |
CRCH,CRCL |
|||||||||
When the device returns abnormal data, the number of bytes returned is always81HThe highest position is1Represents errors, others are quantities,81HThe meaning is: return an error, the error code has one byte. The source of the error isErrCode | ||||||||||||||
ErrCode |
01:The starting position does not exist 02Part of the accessed registers do not exist 03The total length of the read registers exceeds the limit (i.e. exceeds)16A register).04:Other errors.8FH:Invalid command. |
Host settings command(06H)Number of operation registers=1 | |||||||||||||||||
describe |
address |
function code |
Operation address |
|
Data Content |
CRC16 |
|||||||||||
length |
1Byte |
1Byte |
2Byte |
|
N Byte |
2BYte |
|||||||||||
Example |
01H |
06H |
0001H |
|
12H,34H |
D57DH |
|||||||||||
To the address is01HThe device writes data to0001HRegister, write1234H. | |||||||||||||||||
Host settings command(10H)Number of operation registers>= 1, <= sixteen. Can replace06Command word | |||||||||||||||||
describe |
address |
function code |
start address |
Number of Registers |
Data Content |
CRC16 |
|||||||||||
length |
1Byte |
1Byte |
2Byte |
2 Byte |
N Byte |
2BYte |
|||||||||||
Example |
01H |
10H |
0001H |
0002H |
12H,34H,56H,78H |
FE36H |
|||||||||||
To the address is01HThe device writes data from0001HRegister, continuously write the contents of two registers, with the contents in sequence as follows1234H,5678H. | |||||||||||||||||
Set command device returns: Normal(06H) | |||||||||||||||||
describe |
Device Address |
function code |
Operation address |
|
CRC16 |
||||||||||||
length |
1Byte |
1Byte |
2Byte |
|
2BYte |
||||||||||||
Example |
01H |
06H |
0001H |
|
2019H |
||||||||||||
The device returns normal data. | |||||||||||||||||
Set command device returns: Normal(10H) | |||||||||||||||||
describe |
Device Address |
function code |
start address |
Number of Registers |
CRC16 |
||||||||||||
length |
1Byte |
1Byte |
2Byte |
2 Byte |
2BYte |
||||||||||||
Example |
01H |
10H |
0001H |
0002H |
1008H |
||||||||||||
The device returns normal data. | |||||||||||||||||
Setting class command device returns: Exception(06H) | |||||||||||||||||
describe |
address |
function code |
start address |
|
error code |
CRC16 |
|||||||||||
length |
1Byte |
1Byte |
2Byte |
2Byte |
1Byte |
2BYte |
|||||||||||
Example |
01H |
06H |
0001H |
8001H |
ErrCode |
CRCH,CRCL |
|||||||||||
The device returns abnormal data, and the position with the highest number of registers is at this time1, represents the failure of this operation, the source of the error isErrCode | |||||||||||||||||
ErrCode |
01:The starting address does not exist. 02Part of the registers being operated do not exist.03The total length of the operation's registers exceeds the limit (exceeding)16A register).04Write failed.05Error in writing parameters.06Other errors.8FH:Invalid command. |
||||||||||||||||
Setting class command device returns: Exception(10H) | |||||||||||||||||
describe |
address |
function code |
start address |
Number of Registers |
error code |
CRC16 |
|||||||||||
length |
1Byte |
1Byte |
2Byte |
2 Byte |
1Byte |
2BYte |
|||||||||||
Example |
01H |
10H |
0001H |
8002H |
ErrCode |
CRCH,CRCL |
|||||||||||
The device returns abnormal data, and the position with the highest number of registers is at this time1, represents the failure of this operation, the source of the error isErrCode | |||||||||||||||||
ErrCode |
01:The starting address does not exist. 02Part of the registers being operated do not exist.03The total length of the operation's registers exceeds the limit (exceeding)16A register).04Write failed.05Error in writing parameters.06Other errors.8FH:Invalid command. |
7.2.3 MODBUSRegister List in Protocol Format
name |
address |
Reading and writing |
initial value |
describe |
|
Reset |
0000H |
Only write |
XXXXH |
Write any value, and all parameters will be reset to factory values. As long as the written register contains this register, everything else is invalid.Not supporting reading. |
|
Addr |
0001H |
Reading and writing |
0080H |
Value range1-249 |
|
ALRV |
0002H |
Reading and writing |
0000H |
This parameter only applies to analog quantities, measured in millimeters |
|
0003H |
0000H |
||||
AURV |
0004H |
Reading and writing |
Range of measurement50% |
||
0005H | |||||
AoutConfig |
0006H |
Reading and writing |
4005H |
Settings related to analog output, please refer to the attached table for details1 |
|
MeaInterval |
0007H |
Reading and writing |
0000H |
The time interval in milliseconds for returning data during continuous operation. |
When working continuously, the sensor actively uploads measurement data. |
0008H |
Reading and writing |
0064H |
|||
MeaOffset |
0009H |
Reading and writing |
0000H |
The highest bit is the sign bit,0For positive,1Negative, low15Bit is data bit, unitmm Value range:- 32000mm....+ 32000mm |
|
SwitchConfig |
000AH |
Reading and writing |
0004H |
Settings related to switch output. Please refer to the attached table for details2 |
|
SLRV1 |
000BH |
Reading and writing |
0000H |
The unit of its corresponding value is millimeters.The lower limit must be less than the upper limitDetails of the change pattern of switch output status are shown in the attached figure1 |
|
000CH |
0000H |
||||
SURV1 |
000DH |
Reading and writing |
0000H |
||
000EH |
0000H |
||||
SLRV2 |
000FH |
Reading and writing |
0000H |
||
0010H |
0000H |
||||
SURV2 |
0011H |
Reading and writing |
0000H |
||
0012H |
0000H |
||||
OtherConfig |
0013H |
Reading and writing |
0001H |
Other miscellaneous configurations, please refer to the attached table for details |
|
reserve |
|
|
|
|
|
Time Month Year |
0100H |
Reading and writing |
|
formatBCDa sign or object indicating number//Temporarily useless |
|
Time, Day, and Hour |
0101H |
Reading and writing |
|
||
Time in minutes and seconds |
0102H |
Reading and writing |
|
||
reserve |
…… |
|
|
|
|
Model |
1001 |
read only |
|
Sensor model. common5A register,10One byte, encoding methodASCII. |
|
…… | |||||
1005 | |||||
MTS(model,type,serial no.) |
1006H |
read only |
|
common10Byte,5A register with encoding method ofASCIIThe code contains the model, extension information, and serial number. For example:ASW1400010,The extended information is represented asASW(including opinions and attached images)2), with the number1400010 |
|
…… | |||||
100AH | |||||
DriveName |
100BH |
read only |
|
common20Byte, content encoded asASCIIThe value is”Laser ranging sensor” |
|
…… | |||||
1014H | |||||
reserve |
…… |
|
|
|
|
MeaResult |
2001H |
read only |
XXXXH |
The reading unit is millimeters. When there is a measurement error, the return value is fixed as00FFFFFFH; Reading this register does not support broadcasting addresses. |
|
2002H |
read only |
XXXXH |
|||
StartCW |
2003H |
Only write |
|
Writing any data to this register will initiate continuous operation. Writing data is the number of measurements taken after initiating continuous operation. Once the corresponding number of measurements is reached, it will re-enter standby mode. If the written value is0Keep working until it shuts down or sends a command to read measurement values.This register can only be written separately. |
|
AdvanceMea |
2004H |
Only write |
|
To broadcast addressWriting any value to this register will execute the normal measurement process and preset the result. In the next read2001H-2002HAt this time, the measurement process will not be executed and the measurement values will be directly returned to improve overall operational efficiencyThis command is only valid for broadcast addresses and can only be written separately. It has no return value. pour1 |
|
StartCW_NR |
2005H |
Only write |
|
Activate the sensor to enter a continuous working state, but the data does not return and is updated in real-time 2006H,2007HIn two registers. |
|
MeaResult_NRT |
2006H |
read only |
|
Read the value in millimeters, and return the value when there is a measurement error0x00FFFFFF. |
|
2007H | |||||
Tempraure |
2008H |
read only |
|
Customized items |
|
reserve |
…… |
|
|
|
|
TurnOff |
20FFH |
Only write |
|
Shutdown,The sensor enters standby mode |
|
reserve |
…… |
|
|
|
pour1Broadcast address initiates single measurement, sensor initiates measurement but does not return data. When starting a single measurement with the device address next time, the sensor will no longer initiate the measurement but quickly return the previous measurement data. This command is mainly used to improve measurement efficiency when there are multiple machines on a single bus.
MODBUSCommand Example (Device Default Address)80H):
1Read measurement values - Host sends command code
describe |
address |
function code |
start address |
Number of Registers |
CRC16 |
length |
1Byte |
1Byte |
2Byte |
2Byte |
2BYte |
Example |
80H |
03H |
2001H |
0002H |
801AH |
Device returns content
describe |
address |
function code |
Return the number of bytes |
Data Content |
CRC16 |
length |
1Byte |
1Byte |
1Byte |
N Byte |
2BYte |
Example |
80H |
03H |
04H |
00H,00H,01H,64H |
6B40H |
The distance currently measured by the sensor, with a value of0164HMillimeters, i.e356mm |
2Set device address - Host sends command
describe |
address |
function code |
start address |
Number of Registers |
Data Content |
CRC16 |
length |
1Byte |
1Byte |
2Byte |
2Byte |
|
2BYte |
Example |
80H |
10H |
0001H |
0001H |
00H,01H |
F46AH |
Set the device address to01HThis command returns to the original address, and the next command responds to the new address |
Device returned content - successful
describe |
address |
function code |
start address |
Number of Registers |
CRC16 |
length |
1Byte |
1Byte |
2Byte |
2Byte |
2BYte |
Example |
80H |
10H |
0001H |
0001H |
4E18H |
Device returns content - failed
describe |
address |
function code |
start address |
Number of Registers |
error code |
CRC16 |
length |
1Byte |
1Byte |
2Byte |
2Byte |
1Byte |
2BYte |
Example |
80H |
10H |
0001H |
8001H |
04H |
981FH |
7.3External trigger data output data format
When triggered externally, the sensor defaults to outputting data in a simplified format, that is, outputting the distance effective valueASCIICode and carriage return line breaks.
If the measured distance is123.456Rice, its output16The base number is:31 32 33 2E 34 35 36 0D 0A
Parameter Description Appendix:
AoutConfig:
position |
function |
take a value |
meaning |
position |
function |
take a value |
meaning |
15 |
When the measured value is greater than the upper limit, the output value of the analog quantity |
0,0 |
Output minimum value |
7
|
Output direction |
1 |
Reverse output, the larger the distance, the smaller the output |
0,1 |
Output maximum value |
||||||
14 |
1,0 |
output50% |
0 |
|
|||
1,1 |
Maintain the current value |
||||||
13 |
When the measured value is less than the lower limit, the output value of the analog quantity |
0,0 |
Output minimum value |
6 |
reserve |
|
|
0,1 |
Output maximum value |
5 |
reserve |
|
|
||
12 |
1,0 |
output50% |
4 |
reserve |
|
|
|
1,1 |
Maintain the current value |
3 |
reserve |
|
|
||
11 |
Power on Initial value of analog quantity |
0,0 |
Output minimum value |
2 |
Analog output type |
0,0,0 |
0-5Vvoltage |
0,1 |
Output maximum value |
0,0,1 |
0-10Vvoltage |
||||
10 |
1,0 |
output50% |
1 |
1,0,1 |
4..20mAelectric current |
||
1,1 |
Maintain the current value |
0 |
1,1,0 |
0..20mAelectric current |
|||
9 |
When there is a measurement error, the analog output value |
0,0 |
Output minimum value |
1,1,1 |
0..24mAelectric current |
||
0,1 |
Output maximum value |
|
|
|
|
||
8 |
1,0 |
output50% |
|
|
|
|
|
1,1 |
Maintain the current value |
|
|
|
|
SwitchConfig
position |
function |
take a value |
meaning |
|
15..8 |
reserve |
|
|
|
7 |
Trigger Mode |
0 |
Conduct when the measured value is less than the trigger point |
Second switch quantity |
1 |
Conduct when the measured value is greater than the trigger point |
|||
6,5 |
Data exception triggering method |
0,0 |
Disconnect during normal operation |
|
0,1 |
Conducts when abnormal |
|||
1,0 |
Maintain in case of abnormalities |
|||
1,1 | ||||
4 |
Power on Initial state |
0 |
break |
|
1 |
Conduction |
|||
3 |
Trigger Mode |
0 |
Conduct when the measured value is less than the trigger point |
The first switch quantity |
1 |
Conduct when the measured value is greater than the trigger point |
|||
2,1 |
Data exception triggering method |
0,0 |
Disconnect during normal operation |
|
0,1 |
Conducts when abnormal |
|||
1,0 |
Maintain in case of abnormalities |
|||
1,1 | ||||
0 |
Power on Initial state |
0 |
break |
|
1 |
Conduction |
figure1: Switching output
Method Description
OtherConfig(0x0001):
position |
function |
take a value |
meaning |
position |
function |
take a value |
meaning |
15..1 |
reserve |
|
|
0 |
Temperature control enabled |
1 |
Control forced heat dissipation and heating |
8: Instructions for using measurement software
Randomly provide software as testing software, mainly for sensor debugging and parameter setting, not for on-site use.
Our company's supporting software is shown in the above picture
The software is vertically divided into three parts. The left part shows sensor parameters and port settings, the middle part displays measurement results during testing, and the right part provides detailed records of each step of the operation process. The measurement result section displayed in the middle can be cleared by double clicking.
The software usage process is as follows:
1In the "Test Configuration" box in the upper left corner, select the "Communication Port" drop-down box that you are usingCOMMouth number. Due to the automatic detection of available port numbers when the software is opened, it can be inserted after the software is startedUSBchangeCOM, orRJ45changeCOMWhen using the device, click on 'Scan for valid ports' to reload the available port numbers.
2The sensor passes throughRS485perhapsRS232connect toPCAfter the machine, connect the sensor power supply. At this point, click on "Read Parameters" in the bottom left corner. If the wiring is correct, the sensor parameters will be read and automatically filled in the corresponding blank positions.
3As in:2If the parameter reading is successful, measurement testing or parameter reset can be performed.
4Measurement testing.At the bottom of the measurement result display box in the middle, there are corresponding test buttons, which are "single measurement", "continuous measurement", "pre measurement", "fixed frequency measurement" and "timed measurement" (timed measurement is temporarily invalid).
After clicking on 'Single Measurement', the sensor will start measuring and return the corresponding measurement value, then turn off the measurement and enter standby mode, waiting for the next measurement. Single measurement does not respond to broadcast commands. It takes approximately from start to stop2-3In seconds. If the usage environment is not conducive to measurement, the time may be delayed5S.
After clicking on 'Continuous Measurement', the sensor will start measuring and continuously upload data until it receives the command to 'Stop Measurement' or loses power. The time interval for returning data can be set.
Pre measurement ", this command can only be sent to a broadcast address. After sending this command, the sensor will start a single measurement but will not return the measurement result. After the next single measurement command is sent, the sensor will quickly return data.
After the command is issued, the sensor will start a single measurement and continuously return data. When the number of data returns meets the requirements of the command, the measurement will stop and enter standby mode.
5Modifying parameters and setting parameters are divided into two parts. The first part consists of basic parameters (such as address, correction value, measurement return time interval, etc.) and corresponding analog parameters (range, output mode, etc.). After modifying this parameter section, its write button is located in the lower right corner of this parameter box.
The second part includes parameters related to switch output (switch point position, switch driving mode, etc.) and miscellaneous parameters. After modifying this parameter section, its write button is located in the lower right corner of this parameter box.
9: Precautions
l Please carefully read the instruction manual and confirm the wiring sequence before use.
l Sensor power supply, please use DC power and do not exceed the maximum voltage30V.
l Please do not operate with electricity when wiring.
l After connecting the wires, please handle any unused wires accordingly to avoid short circuits.
l Please do not look directly at the laser during use.
l In environments with dust, mist, and other factors that affect laser penetration, it can affect measurement results.
l Under strong light conditions, the sensor range will be affected
l The following measurement environments may lead to inaccurate results: transparent objects, specular reflective surfaces, porous surfaces (foam, etc.) and other surfaces.
l In high reflectivity environments, measuring low reflectivity surfaces may lead to increased result errors.
l When sensors are stored for a long time, please try to seal and store them in a dry environment.
l If there are further revisions to this manual, we will not be able to notify you in a timely manner. If necessary. Please download the latest version of the manual from the company website.www.cht2010.com
11: Technical support and after-sales service
Our company's products come with a one-year free warranty under normal use. Lifetime cost maintenance. The following situations are not covered by the free warranty.
l Exceeding the warranty period by more than one month.
l Non company personnel carry out repairs, modifications, alterations, etc.
l Abnormal use (such as high voltage, incorrect wiring, water ingress, external damage, natural disasters, lightning strikes, etc.).
l The sensor module is covered by warranty due to the exposed circuit board7Oh my god.
Service Hotline:,
Fax:
website:www.cht2010.com